package com.example.studyroom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.studyroom.Entity.User;
import com.example.studyroom.dto.User.UserInfoDTO;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
//    @Select("select * from user where uname = #{uname} and upass = #{upass}")
//    User findByUserLogin(String uname, String upass);
//
//    @Select("SELECT * FROM User WHERE Uname = #{username}")
//    User selectByUsername(String username);
//    @Insert("INSERT INTO User (Uname, Upass, phone, gender, age, hobby, address) VALUES (#{uname}, #{upass}, #{phone}, #{gender}, #{age}, #{hobby}, #{address} )")
//    void insertUser(User user);
//
//    @Select("SELECT * FROM User")
//    List<User> getAllUsers();
//
//    @Delete("DELETE FROM User WHERE Uid = #{uid}")
//    void deleteUser(Integer uid);
//
//    @Update("UPDATE User SET Upass = #{upass} WHERE Uid = #{uid} ")
//    void modifyPass(User user);
//
//    @Select("SELECT * FROM User WHERE Uname = #{Uname}")
//    List<UserInfoDTO> getUserInfo(@Param("Uname") String Uname);
//
//    @Update("UPDATE User SET Uname = #{Uname}, phone = #{phone}, " +
//            "gender = #{gender}, age = #{age}, hobby = #{hobby}, address = #{address} WHERE Uname = #{Uname}")
//    void modifyUserInfo(User user);
}
